// GeneralForceAssignStrategy.cpp: implementation of the GeneralForceAssignStrategy class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "GeneralForceAssignStrategy.h"
#include "Joininfo.h"
#include "Part.h"
#include "uevector.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

GeneralForceAssignStrategy::GeneralForceAssignStrategy()
{
	StrategyNum(ForceAssign::eGENERALSTRATEGY);
}

GeneralForceAssignStrategy::~GeneralForceAssignStrategy()
{

}

BOOL GeneralForceAssignStrategy::Execute()
{
/*	Part* pPart = GetOwner()->GetOwner();
	ASSERT(pPart);
	JointFunction* pSufferPort = GetOwner()->SufferForcePort();
	ASSERT(pSufferPort);

	JointInfo info(pPart);
	if(info.GetJointNum() != 2)
		return FALSE;

	JointFunction* pJoint = info.GetFirst();
	while(pJoint != NULL)
	{
		if(pJoint != pSufferPort)
			break;
		pJoint = info.GetNext();
	}

	UeVector vGravity;
	vGravity.set(0, 0, -(pPart->GetWeight()));
	UeVector vector;
	vector = -(vGravity + pSufferPort->GetForce());
	pJoint->SetForce(vector);*/

	return TRUE;
}